package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicSupplierInfoMapper;
import com.ruoyi.system.domain.BasicSupplierInfo;
import com.ruoyi.system.service.IBasicSupplierInfoService;

/**
 * 供应商信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicSupplierInfoServiceImpl implements IBasicSupplierInfoService 
{
    @Autowired
    private BasicSupplierInfoMapper basicSupplierInfoMapper;

    /**
     * 查询供应商信息
     * 
     * @param supplierId 供应商信息主键
     * @return 供应商信息
     */
    @Override
    public BasicSupplierInfo selectBasicSupplierInfoBySupplierId(Long supplierId)
    {
        return basicSupplierInfoMapper.selectBasicSupplierInfoBySupplierId(supplierId);
    }

    /**
     * 查询供应商信息列表
     * 
     * @param basicSupplierInfo 供应商信息
     * @return 供应商信息
     */
    @Override
    public List<BasicSupplierInfo> selectBasicSupplierInfoList(BasicSupplierInfo basicSupplierInfo)
    {
        return basicSupplierInfoMapper.selectBasicSupplierInfoList(basicSupplierInfo);
    }

    /**
     * 新增供应商信息
     * 
     * @param basicSupplierInfo 供应商信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicSupplierInfo(BasicSupplierInfo basicSupplierInfo)
    {
        return basicSupplierInfoMapper.insertBasicSupplierInfo(basicSupplierInfo);
    }

    /**
     * 修改供应商信息
     * 
     * @param basicSupplierInfo 供应商信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicSupplierInfo(BasicSupplierInfo basicSupplierInfo)
    {
        return basicSupplierInfoMapper.updateBasicSupplierInfo(basicSupplierInfo);
    }

    /**
     * 批量删除供应商信息
     * 
     * @param supplierIds 需要删除的供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicSupplierInfoBySupplierIds(Long[] supplierIds)
    {
        return basicSupplierInfoMapper.deleteBasicSupplierInfoBySupplierIds(supplierIds);
    }

    /**
     * 删除供应商信息信息
     * 
     * @param supplierId 供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteBasicSupplierInfoBySupplierId(Long supplierId)
    {
        return basicSupplierInfoMapper.deleteBasicSupplierInfoBySupplierId(supplierId);
    }
}
